home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / DDJMAG / DDJ9207.ZIP / WPAPER.TXT < prev    next >
Text File  |  1992-03-31  |  15KB  |  255 lines

  1. Subject: White Paper
  2. Date: Tue, 17 Mar 92 15:52:12 MST
  3.  
  4.  
  5. TWAIN 
  6. Linking applications and images
  7.  
  8.  
  9. The Issue
  10. ^^^^^^^^^
  11. In desktop publishing's early days, most publications contained only text 
  12. and simple black-and-white line drawings that were output to black-and-white
  13. laser printers. In recent years, however, computer hardware and software 
  14. has become much more sophisticated. Both business professionals and graphic 
  15. artists can now create and output complex, full-color publications. This 
  16. near-commercial-quality work may include black-and-white, greyscale, and 
  17. color images acquired from desktop and hand-held scanners, or from still 
  18. video, digital cameras or image capture boards. This growth in technology 
  19. means vendors are faced with a challenge: to supply customers with hardware 
  20. and software products that enhance productivity by working together 
  21. seamlessly for an efficient, easy-to-use computing process. Unfortunately, 
  22. image acquisition remains a difficult process. To acquire and place an 
  23. image in your publication, you must leave the application in which you are 
  24. working. Then you must locate and open a hardware driver, set the device 
  25. options, acquire the image, save it to disk, close the hardware driver, 
  26. return to the application, then locate and read in the image file from 
  27. disk. The process is time-consuming and tedious, and not how business 
  28. professionals, designers, or publishers want to work, particularly with 
  29. the increasing need for on-demand integration of images acquired in real 
  30. time. 
  31.  
  32.  
  33. The Solution
  34. ^^^^^^^^^^^^
  35. When the image-acquisition issue surfaced, hardware and software 
  36. developers began defining their own image acquisition interfaces. This 
  37. was a step in the right direction, but it soon became apparent that high 
  38. numbers of proprietary interfaces were not the ultimate solution. It's 
  39. inefficient to require a software developer to write a driver for each 
  40. device they need to support. Conversely, it doesn't make sense to ask a 
  41. hardware vendor to write a different driver to interface with each 
  42. software application. Most importantly, it isn't acceptable that users 
  43. must deal with many unique application/device driver files. 
  44.  
  45. Users need a painless way to get image data into their applications. 
  46. Software developers need compatibility with the widest range of output 
  47. devices without writing and maintaining multiple device drivers. 
  48. Hardware developers need compatibility with the greatest number of 
  49. applications without application-dependent coding.
  50.  
  51. The most obvious solution to this situation is an open industry 
  52. interface that directly acquires image data from external sources while 
  53. within an application. In this scenario, each software developer 
  54. supports a standard data acquisition manager and each hardware vendor 
  55. writes one driver for their device. Hardware vendors will benefit 
  56. because they need only provide one standard driver for their device, 
  57. which can then be used by all software applications supporting the 
  58. standard data acquisition interface. Software vendors will be freed 
  59. from writing and supporting device drivers, or from soliciting support 
  60. for their own proprietary interface. Software vendors will also benefit 
  61. because one single interface will support those vendors writing these 
  62. device drivers. Users will benefit because they can place a smaller set 
  63. of drivers at the operating system level and take advantage of seamless 
  64. images acquisition from a large number of applications. 
  65.  
  66. History and structure of the TWAIN consortium
  67. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  68. In early 1990, the formation of the Macintosh Scanner Roundtable group 
  69. heightened the imaging industry's awareness of the need for an open 
  70. interface. While participation in the roundtable was high, it was 
  71. difficult to resolve issues and progress was slow. At one of the group's 
  72. last meetings in 1990, it was suggested that a smaller set of industry 
  73. leaders form a consortium and create a specification for review, 
  74. revision, and ultimate adoption by the imaging industry. 
  75.  
  76. The TWAIN Working Group was formed with representatives from Aldus, 
  77. Caere, Eastman Kodak, Hewlett-Packard, and Logitech. The Working Group's 
  78. primary goal was defined as promoting imaging product use by developing 
  79. an integrated easy-to-use image acquisition interface and educating 
  80. users about its existence. A key requirement of participation was that 
  81. members be willing to represent a broader interest than that of their 
  82. own company. The number of participants was kept low so the 
  83. specification could be written quickly, while representation from a 
  84. wide spectrum of application developers (desktop communications and 
  85. OCR) and hardware vendors (hand-held, desktop, and high-end color 
  86. imaging devices) was maintained. The result was that working group 
  87. members represent diversity in the industry, and bring in-depth imaging 
  88. experience to both hardware and software development, and marketing 
  89. fields. 
  90.  
  91. At the TWAIN Working Group's first meetings, engineers faced the huge 
  92. task of reviewing specifications and resolving outstanding requirements 
  93. issues. Most Working Group companies had written their own interface for 
  94. direct image acquisition, and these were considered, as well as more 
  95. than two dozen specifications provided by other companies. No single 
  96. specification or protocol, including those from operating system 
  97. vendors, provided the completeness, richness of functionality, and ease 
  98. of implementation that was required. Eventually, a composite of Silicon 
  99. Beach/Adobe Plug-ins, an internal Aldus protocol, an HP protocol under 
  100. development and Logitech's SAPI was used as the basis for TWAIN.
  101.  
  102. TWAIN Working Group engineers participated in monthly workshops to 
  103. define the specification. A separate Marketing Working Group meets to 
  104. discuss publishing a toolkit, supporting the interface, and other issues, 
  105. including how to inform the industry and public about the interface. 
  106.  
  107. Besides the TWAIN Working Group, more than 175 major imaging hardware 
  108. and software companies form a group called the "TWAIN Coalition." This 
  109. larger group reviewed the TWAIN specification and provided feedback prior 
  110. to its release. The TWAIN Working Group took comments and suggestions 
  111. from the TWAIN Coalition, examined the costs and benefits of the 
  112. modifications, and decided which to incorporate into the specification. 
  113. Some Coalition members have completed a review of the specification and 
  114. endorse it as being technically sound and beneficial for the industry; 
  115. they are identified on an endorser's list available from any Working Group 
  116. contact. The specification is now nearing completion, and applications 
  117. and sources supporting TWAIN will soon be available.
  118.  
  119. Goals of the TWAIN Specification
  120. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  121. TWAIN was designed to provide a consistent, easy integration of image 
  122. data between sophisticated input devices and software applications. More 
  123. detailed Working Group goals for the specification included: 
  124.  
  125. o Multiple platform support - The interface must work on the Macintosh 
  126.   and under Windows, but should also have the ability to extend to UNIX, 
  127.   OS/2 and other platforms. Use of platform-specific mechanisms should be 
  128.   kept to a minimum.
  129. o Support for multiple devices - These include hand-held scanners, 
  130.   flatbed scanners, slide scanners, image capture boards or frame grabbers, 
  131.   digital cameras and image databases-a broad range of raster image-
  132.   generating devices.
  133. o Widespread acceptance - Provide an interface that is well-defined and 
  134.   enables the majority of the leading hardware and software developers to 
  135.   provide drivers for their devices or include support through their 
  136.   applications.
  137. o Extensibility and revisability - As the industry grows, the 
  138.   specification's architecture should be extensible and able to handle 
  139.   new, unknown conditions. Revisions will be backwards-compatible with 
  140.   code written to earlier versions of the specification.
  141. o Easy implementation - The interface and its documentation should be 
  142.   clear, well structured, well written, and intuitively designed for 
  143.   developers to learn and write the code for it.
  144. o Longevity - While the aim is to provide a solution as quickly as 
  145.   possible, the Working Group is doing all it can to make sure the 
  146.   interface is structurally sound and encompasses all functionality 
  147.   necessary to provide a single solution for the industry that will last 
  148.   for several years, or until such time as a facility like this might be 
  149.   supported at the operating system level. It is a goal of the Working 
  150.   Group that this functionality be incorporated at the operating system 
  151.   level and be TWAIN compatible. 
  152. o Multidata Capacity - This general data interchange mechanism must be 
  153.   able to transmit data in existing standard formats and native file 
  154.   formats such as TIFF, PICT, and DIB. Furthermore, TWAIN was designed to 
  155.   easily support data type extensions outside the realm of images (such 
  156.   as text, facsimile data and vector graphics.) 
  157.  
  158. Architecture         
  159. ^^^^^^^^^^^^
  160. TWAIN provides a simple, yet rich, methodology for universally connecting 
  161. TWAIN-compliant applications with TWAIN-aware devices. The model for how 
  162. applications interact with the source of input data can be described 
  163. through a four-layer protocol: the Application Layer, Protocol Layer, 
  164. Acquisition Layer and Device Layer.  The acquisition components correspond 
  165. to these layers and include the application, Source Manager, Source and 
  166. physical hardware device.  The application communicates through the Source 
  167. Manager to a Source driver which represents the physical hardware device 
  168. that generates image data. 
  169.  
  170. The hardware interface element of the TWAIN architecture is the Source. 
  171. A Source is a TWAIN entity whose purpose is to get data from a hardware 
  172. device and provide it to a TWAIN-compliant application. A Source is 
  173. typically written by the hardware vendor to control their peripheral 
  174. device.   These devices are usually a physical piece of hardware, such as 
  175. a scanner, although a virtual device (such as an image database) also fits 
  176. the Source model. The device may be locally connected or remotely accessed 
  177. over a network.
  178.  
  179. The core element of this architecture is the Source Manager (SM). The 
  180. SM's primary role is to establish and manage the connections between the 
  181. application and the sources. The SM allows the user to select the desired 
  182. source, loads and unloads the selected source, and makes sure that all 
  183. calls from a particular application are correctly routed to the 
  184. appropriate source. The SM is implemented as a code resource on the 
  185. Macintosh and a Dynamically Linked Library (DLL) under Microsoft Windows. 
  186. Under Windows, there will be only one copy of the SM active in memory at 
  187. any given time. On the Mac, there will be a separate copy of the SM for 
  188. each application accessing it. When the application needs to communicate 
  189. with a Source, it calls the SM with a correctly addressed message. An 
  190. application never calls a Source directly.
  191.  
  192. Let's review how to acquire an image with TWAIN: From the application, 
  193. the user first chooses "Select Source" from the menu. "Select Source" 
  194. identifies the source device from which the image will be acquired, and 
  195. is only accessed by the user when it's necessary to switch between 
  196. multiple connected devices. "Select Source" invokes the Source Manager 
  197. and a selection dialog box appears. Once the source is selected, the 
  198. user choses "Acquire" to initiate the image acquisition process. 
  199. "Acquire" brings up the Source Manager to facilitate a process called 
  200. "capabilities negotiation." This takes place between the application 
  201. sending messages (describing the data it wants) and the Source (defining 
  202. the data it can provide). When negotiation is complete, all user 
  203. interface control is passed to the Source. The Source's user interface 
  204. allows the user to set scanning options and start the scan. The Source 
  205. passes the image data back through the Source Manager to the Application, 
  206. which allows the user to place the image in their document if they 
  207. haven't already specified its destination.
  208.  
  209. TWAIN implementation allows a high degree of flexibility. Application 
  210. developers can choose from four different levels of support, which 
  211. increase in complexity. They include Glue Code, Basic, Advanced, or 
  212. Custom Support. Source developers can decide among three support 
  213. options: Basic, Advanced, or Custom. These options give developers the 
  214. ability to either support TWAIN with minimal engineering investment, or 
  215. to use TWAIN for greater differentiation through their user interfaces 
  216. and more complete access to all their product's capabilities.
  217.  
  218. How you can become involved
  219. ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  220. Developers: In the U.S or Canada, call 1-800-722-0379 to order the TWAIN 
  221. Toolkit.  Outside U.S. or Canada, call (206) 628-5737 from your fax 
  222. machine and fax yourself document number 9154, the TWAIN Toolkit order 
  223. form.  The toolkit will contain the TWAIN specification, Source Manager, 
  224. a header file, code for a sample application and Source, as well as a 
  225. marketing guide. Developer support will be available from all Working 
  226. Group companies.
  227.  
  228. Users: Look for the TWAIN logo or name on any hardware or software you 
  229. purchase. Ask product vendors when they will be supporting TWAIN. Refer 
  230. developers to any TWAIN Working Group member listed below if they are 
  231. not yet aware of this interface. Let Working Group companies know how you 
  232. work with TWAIN, especially if you have ideas on how the interface can be 
  233. improved or extended to better meet your needs and the way you work.
  234.  
  235.  
  236. TWAIN Working Group Contacts
  237. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  238.   Aldus           - Developers Desk (206) 628-6593
  239.   Caere           - Fax Support (408) 354-2743
  240.   Eastman Kodak   - Support Line (716) 724-1682
  241.   Hewlett-Packard - TWAIN Support (303) 350-4830
  242.   Logitech        - TWAIN Developer Support (510) 713-5DEV 
  243.  
  244.  
  245. A note on our name 
  246. ^^^^^^^^^^^^^^^^^^
  247. Some of you may have been introduced to the TWAIN interface under the 
  248. names "Direct-Connect" or "CLASP." While this effort has been promoted 
  249. under these names in the past, trademark searches turned up too many 
  250. conflicts for us to feel comfortable using either of these as the final 
  251. name. After numerous searches, we selected the name TWAIN to describe 
  252. this interface which brings together two entities, applications and 
  253. input devices, in a meeting of the "TWAIN." 
  254.  
  255. /* end document */